<<<<<<< HEAD
CREATE TABLE jmd_dm.dm_end_center_error_scan_cnt_dt (
                                                        center_code varchar(50) NULL COMMENT "中心编码",
                                                        agent_code varchar(50) NULL COMMENT "代理区code",
                                                        ordersource_name varchar(100) NULL COMMENT "订单来源",
                                                        date_time date NULL COMMENT "查询时间",
                                                        center_name varchar(100) NULL COMMENT "中心名称",
                                                        agent_name varchar(100) NULL COMMENT "代理区",
                                                        error_cnt int(11) NULL COMMENT "错分量",
                                                        operate_cnt int(11) NULL COMMENT "操作量",
                                                        second_exception int(11) NULL COMMENT "二段码异常",
                                                        up_bagging_exception int(11) NULL COMMENT "上环节建包异常",
                                                        equipment_exception int(11) NULL COMMENT "设备异常",
                                                        return_cnt int(11) NULL COMMENT "退回件",
                                                        send_on int(11) NULL COMMENT "转寄件",
                                                        delete_scan int(11) NULL COMMENT "扫描删除",
                                                        human_factor int(11) NULL COMMENT "人为因素",
                                                        virt_code varchar(50) NULL COMMENT "虚拟代理区code",
                                                        virt_name varchar(100) NULL COMMENT "虚拟代理区name",
                                                        provider_id varchar(50) NULL COMMENT "省份id",
                                                        provider_name varchar(100) NULL COMMENT "省份name"
) ENGINE=OLAP 
DUPLICATE KEY(center_code, agent_code, ordersource_name)
COMMENT "错分率-汇总"
PARTITION BY RANGE(date_time)( 
   START ("2023-06-30") END ("2023-07-10") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(ordersource_name) BUCKETS 2 
=======
create  table jms_dm.dm_end_center_error_scan_cnt_dt 
(
sate_time  timestamp COMMENT '查询时间' ,
center_code  varchar(100) COMMENT '中心编码' ,
center_name  varchar(100) COMMENT '中心名称' ,
agent_code  varchar(100) COMMENT '代理区code' ,
agent_name  varchar(100) COMMENT '代理区' ,
ordersource_name  varchar(100) COMMENT '订单来源' ,
error_cnt   varchar(100) COMMENT '错分量' ,
operate_cnt  varchar(100) COMMENT '操作刘昂' ,
second_exception  varchar(100) COMMENT '二段码异常' ,
up_bagging_exception  varchar(100) COMMENT '上环节建包异常' ,
equipment_exception  varchar(100) COMMENT '设备异常' ,
return_cnt  varchar(100) COMMENT '退回件' ,
send_on  varchar(100) COMMENT '转寄件' ,
delete_scan  varchar(100) COMMENT '扫描删除' ,
human_factor varchar(100) COMMENT '人为因素' ,
virt_code varchar(100) COMMENT '' ,
virt_name varchar(100) COMMENT '' ,
 provider_id varchar(100) COMMENT '' ,
provider_name varchar(100) COMMENT '' )
ENGINE=OLAP
DUPLICATE KEY(填写key)
comment 'insert overwrite table jms_dm.dm_end_center_error_scan_cnt_dt'
PARTITION BY RANGE (date_time) ( 
   START ("2023-06-03") END ("2023-08-02") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
>>>>>>> macheng
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
<<<<<<< HEAD
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);
---------
=======
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);
>>>>>>> macheng
